﻿<s:SurfaceUserControl 
  x:Class="SurfaceCardsGameKit.CardUC"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:WPFMitsuControlsv2;assembly=WPFMitsuControlsv2"
  xmlns:local="clr-namespace:SurfaceCardsGameKit"
  xmlns:s="http://schemas.microsoft.com/surface/2008"
  xmlns:ssg="clr-namespace:Microsoft.Surface.Presentation.Generic;assembly=Microsoft.Surface.Presentation.Generic"
  Width="{Binding Width, Mode=TwoWay}"
  Height="{Binding Height, Mode=TwoWay}">

  <s:SurfaceUserControl.Template>
    <ControlTemplate TargetType="{x:Type local:CardUC}">
      <Grid x:Name="MyGrid">

        <ssg:SurfaceShadowChrome Color="{Binding ShadowColor}" Margin="{Binding ShadowMargin}" 
                               CornerRadius="{Binding ShadowCornerRadius}" Opacity="{Binding ShadowOpacity}"
                               Visibility="{Binding ShadowVisibility}"/>

        <controls:BookPage x:Name="MyBookPage" CanDragOutOfPage="False"
                           GripSize="20"
                           IsTopLeftCornerEnabled="{Binding IsTopLeftCornerEnabled}"
                           IsTopRightCornerEnabled="{Binding IsTopRightCornerEnabled}"
                           IsBottomLeftCornerEnabled="{Binding IsBottomLeftCornerEnabled}"
                           IsBottomRightCornerEnabled="{Binding IsBottomRightCornerEnabled}"
                           Page0Content="{Binding FrontContent}" Page0Background="{Binding FrontBackground}"
                           Page1Content="{Binding BackContent}" Page1Background="{Binding BackBackground}"
                           Visibility="{Binding BookPageVisibility}"
                           />
      </Grid>

    </ControlTemplate>
  </s:SurfaceUserControl.Template>

</s:SurfaceUserControl>
